package suanfa;

import java.util.Arrays;
import java.util.Scanner;

/**
 * Description:
 * Author:    Dane
 * CreateTime:2024/9/19-下午5:39
 * Since  :   1.0
 * Version:   1.0
 */
public class test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count=scanner.nextInt();
        for (int i = 0; i < count; i++) {
            int a=scanner.nextInt();
            int b=scanner.nextInt();
            int c=scanner.nextInt();
            System.out.println(a+","+b+","+c);
            int[] d=new int[b];
            for (int j = 0; j < b; j++) {
                d[i]=scanner.nextInt();
            }
            System.out.println(Arrays.toString(d));
        }
    }
}
